home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-in_the_mag-
/
reader_requests
/
notes
/
deutsch
/
noten.pprx
< prev
next >
Wrap
Text File
|
2000-02-23
|
14KB
|
617 lines
/*
@B Noten @P@ICopyright A.Faust 98
dieses Genie zeichnet Notenlinien und Noten
*/
address command
'execute C:AssignNotenDruck'
/* Das File "AssignNotenDruck" im C: Verzeichnis muß mit einem normalen
Texteditor erstellt werden, und legt fest, wo die Notenfiles
gespeichert sind. Das macht die Auswahl später einfacher.
Das Genie sucht zuerst im festgelegten Verzeichnis "Noten:"
z.B.
assign Noten: Work:MeinNotenFileVerzeichnis
Als zweite Zeile MUSS ein Assign für das Genie-Verzeichnis von Propage
gesetzt werden.
z.B.
assign Genies: DTP:ProPage/ARexx
*/
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
call ppm_SetWireframe(0)
notex=0
notey=0
call ppm_SetLineWeight(0.25)
call ppm_SetMagMode(300)
call ppm_SetBoxOutlines(0)
signal on halt
signal on break_c
signal on break_e
signal on break_d
start:
do
neu = ppm_GetUserText(2, "Neubeginn? (ALLES WIRD GELÖSCHT !!!!) Nichts=ABBRUCH j/n")
if neu == "J" then neu = "j"
if neu == "N" then neu = "n"
select
when neu == "j" then
do
sicher =
call ppm_New()
call ppm_SetUnits(2)
call ppm_SetMagMode(200)
call ppm_SetFont('(CG)Times')
pgnm = ppm_CreatePage(1, 1, 0)
call ppm_SetPageType(pgnm, 4)
call ppm_SetRulerType(4)
call ppm_SetBoxLock(0, 0)
call ppm_DeleteBox(0)
/* Kopfzeile */
haedln = ppm_CreateBox(4, 0.2, 11.5, 1.2, 0)
call ppm_SetSize(20)
call ppm_SetStyle(U)
call ppm_SetJustification(2)
call ppm_TextIntoBox(haedln, 'Text')
end
when neu == "n" then notenlinien()
otherwise exit_msg("ABBRUCH!")
end
notenlinien:
res = ppm_GetUserText(2, "Notenlinien zeichnen ? j/n")
if res == '' then res = 'j'
if res == 'J' then res = 'j'
if res == 'j' then
do
call ppm_SetUnits(2)
call ppm_SetMagMode(200)
call ppm_SetFont('(CG)Times')
pgnm = ppm_CurrentPage()
call ppm_SetPageType(pgnm, 4)
call ppm_SetRulerType(4)
call ppm_SetBoxLock(0, 0)
call ppm_DeleteBox(0)
/* Kopfzeile */
haedln = ppm_CreateBox(4, 0.2, 11.5, 1.2, 0)
call ppm_SetSize(20)
call ppm_SetStyle(U)
call ppm_SetJustification(2)
call ppm_TextIntoBox(haedln, 'Titel')
/* Autor */
autor = ppm_CreateBox(13, 0.9, 6.5, 0.64, 0)
call ppm_SetSize(12)
call ppm_SetStyle(U)
call ppm_SetJustification(1)
call ppm_TextIntoBox(autor, "Satz: © Autor")
/* Notenlinien ziehen */
do a=1 to 12
do b=1 to 5
call ppm_DrawLine(0, a*2+((b-1)/5), 19.5, a*2+((b-1)/5))
end
end
/* Notenschlüssel und vordere Klammern */
call ppm_SetFont('(CG)Noten')
violschl = ppm_CreateBox(0, 1.55, 1, 1.6, 0)
call ppm_SetStyle(N)
call ppm_SetJustification(0)
call ppm_SetSize(45)
call ppm_TextIntoBox(violschl, 't')
bassschl = ppm_CreateBox(0.034, 3.88, 1.1, 1.1, 0)
call ppm_SetSize(30)
call ppm_TextIntoBox(bassschl, 'b')
call ppm_SetLineWeight(4)
vl = ppm_DrawLine(0, 1.98, 0, 4.82)
call ppm_SetLineWeight(2)
vo = ppm_DrawLine(-0.07, 2.08, 0.303, 1.7627)
vu = ppm_DrawLine(-0.07, 4.74, 0.303, 5.052)
do c=1 to 5
call ppm_CloneBox(violschl, 0, (c*4))
call ppm_CloneBox(bassschl, 0, (c*4))
call ppm_CloneBox(vl, 0, (c*4))
call ppm_CloneBox(vo, 0, (c*4))
call ppm_CloneBox(vu, 0, (c*4))
end
vorzeichen()
end
else
do
if res == 'N' then res = 'n'
if res == 'n' then vorzeichen()
else start()
end
end
noteneingabe:
res = ppm_GetUserText(4, "Violin- oder Basschlüssel? (v/b) [aus File (f)]")
resa = word(res,1)
resb = word(res,2)
if resa=='V' then resa = 'v'
if resa=='B' then resa = 'b'
if resb=='F' then resb = 'f'
select
when resa=='v' then violschl()
when resa=='b' then basschl()
otherwise noteneingabe()
end
violschl:
do
call ppm_SetFont('(CG)Noten')
select
when resb='' then
do
address command
rx 'Genies:Violinenschlüssel.rexx'
end
when resb='f' then
do
address command
rx 'Genies:Violinenschlüssel.file'
end
otherwise noteneingabe()
end
exit
end
basschl:
do
call ppm_SetFont('(CG)Noten')
select
when resb='' then
do
address command
rx 'Genies:Bassschlüssel.rexx'
end
when resb='f' then
do
address command
rx 'Genies:Bassschlüssel.file'
end
otherwise noteneingabe()
end
exit
end
exit
vorzeichen:
vorz = ppm_GetForm("Vorzeichen bitte! ENTER = kein VZ...", 4, "Zahl Vorz.")
if vorz == "" then
do
k = 0
takt()
end
else
do
call ppm_SetFont('(CG)Noten')
call ppm_SetSize(20)
zahl = word(vorz, 1)
art = word(vorz, 2)
yy = 0.28
j = 0
select
when art == 'b' then
do
art = 'f'
select
when zahl == '1' then
do i=1 to 6
id = ppm_CreateBox(1, 1.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 4.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 1
j = j+4
end
when zahl == '2' then
do i=1 to 6
id = ppm_CreateBox(1, 1.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.65+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 4.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 3.85+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 2
j = j+4
end
when zahl == '3' then
do i=1 to 6
id = ppm_CreateBox(1, 1.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.65+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 2.05+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 4.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 3.85+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 4.25+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 3
j = j+4
end
when zahl == '4' then
do i=1 to 6
id = ppm_CreateBox(1, 1.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.65+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 2.05+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 1.75+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 4.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 3.85+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 4.25+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 3.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 4
j = j+4
end
when zahl == '5' then
do i=1 to 6
id = ppm_CreateBox(1, 1.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.65+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 2.05+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 1.75+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 2.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 4.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 3.85+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 4.25+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 3.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 4.35+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 5
j = j+4
end
when zahl == '6' then
do i=1 to 6
id = ppm_CreateBox(1, 1.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.65+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 2.05+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 1.75+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 2.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(2.0, 1.85+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 4.15+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 3.85+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 4.25+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 3.95+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 4.35+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(2.0, 4.05+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 6
j = j+4
end
otherwise vorzeichen()
end
end
when art == '#' then
do
art = 's'
select
when zahl == '1' then
do i=1 to 6
id = ppm_CreateBox(1, 1.67+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 3.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 1
j = j+4
end
when zahl == '2' then
do i=1 to 6
id = ppm_CreateBox(1, 1.67+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.97+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 3.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 4.17+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 2
j = j+4
end
when zahl == '3' then
do i=1 to 6
id = ppm_CreateBox(1, 1.67+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.97+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 1.57+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 3.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 4.17+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 3.77+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 3
j = j+4
end
when zahl == '4' then
do i=1 to 6
id = ppm_CreateBox(1, 1.67+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.97+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 1.57+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 1.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 3.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 4.17+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 3.77+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 4.07+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 4
j = j+4
end
when zahl == '5' then
do i=1 to 6
id = ppm_CreateBox(1, 1.67+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.97+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 1.57+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 1.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 2.17+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 3.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 4.17+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 3.77+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 4.07+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 4.37+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 5
j = j+4
end
when zahl == '6' then
do i=1 to 6
id = ppm_CreateBox(1, 1.67+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 1.97+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 1.57+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 1.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 2.17+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(2.0, 1.77+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1, 3.87+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.2, 4.17+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.4, 3.77+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.6, 4.07+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(1.8, 4.37+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
id = ppm_CreateBox(2.0, 3.97+j, 0.35, 0.75, 0)
call ppm_TextIntoBox(id, art)
k = 6
j = j+4
end
otherwise vorzeichen()
end
end
otherwise vorzeichen()
end
takt()
end
takt:
do
call ppm_SetFont('(CG)Times')
call ppm_SetSize(16)
takt = ppm_GetForm("Taktart ENTER= Keine Angabe", 4, "4/4 = "4 4" ...")
if takt ~= '' then
do
oben = WORD(takt, 1)
unten = WORD(takt, 2)
if unten == '' then takt()
id = ppm_CreateBox(1+(k*0.3), 2, 0.3, 0.6, 0)
call ppm_TextIntoBox(id, oben)
id = ppm_CreateBox(1+(k*0.3), 2.4, 0.3, 0.6, 0)
call ppm_TextIntoBox(id, unten)
id = ppm_CreateBox(1+(k*0.3), 4, 0.3, 0.6, 0)
call ppm_TextIntoBox(id, oben)
id = ppm_CreateBox(1+(k*0.3), 4.4, 0.3, 0.6, 0)
call ppm_TextIntoBox(id, unten)
end
else NOP
call ppm_SetFont('(CG)Noten')
call ppm_SetSize(20)
call ppm_UpdateScreen()
noteneingabe()
end
break_d:
break_e:
break_c:
halt:
call exit_msg("User aborted Genie!")
exit_msg: procedure
do
parse arg message
if message ~= '' then
call ppm_Inform(1,message,)
call ppm_ClearStatus()
call ppm_AutoUpdate(1)
exit
end